import request from "@/utils/request";

//请求前缀
const api_prefix = "/notice";

export function queryAll() {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/query/all`,
    method: "GET",
  });
}

export function queryReadNotice() {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/query/read`,
    method: "GET",
  });
}

export function queryUnReadNotice() {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/query/unread`,
    method: "GET",
  });
}

export function updateNotice(id) {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/update/one/${id}`,
    method: "PUT",
  });
}

export function updateNoticeAll() {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/update/all`,
    method: "PUT",
  });
}

export function update(id) {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/update/${id}`,
    method: "PUT",
  });
}

export function remove(id) {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/delete/${id}`,
    method: "DELETE",
  });
}